package com.service.impl;

import java.io.Serializable;
import java.util.List;

import com.dao.UserinfoDao;
import com.enetiy.Userinfo;
import com.service.UserinfoService;

public class UserinfoServiceImpl implements UserinfoService {
private UserinfoDao userinfoDao;
	@Override
	public Userinfo selectUserinfo(int uid) throws Exception {
		
		return userinfoDao.selectUserinfo(uid);
	}

	@Override
	public void updateUserinfo(Userinfo ui) throws Exception {
		userinfoDao.updateUserinfo(ui);
	}

	@Override
	public Serializable insertUserinfo(Userinfo ui) throws Exception {
		return userinfoDao.insertUserinfo(ui);
	}

	@Override
	public void deleteUserinfo(Userinfo ui) throws Exception {
		userinfoDao.deleteUserinfo(ui);

	}

	public void setUserinfoDao(UserinfoDao userinfoDao) {
		this.userinfoDao = userinfoDao;
	}

	@Override
	public Userinfo selectUserToken(String token, int id) throws Exception {
		return userinfoDao.selectUserToken(token, id);
	}

	@Override
	public Userinfo selectUserMac(String Mac) throws Exception {
		return userinfoDao.selectUserMac(Mac);
	}

	@Override
	public List<Userinfo> selectUserinfos() throws Exception {
		return userinfoDao.selectUserinfos();
	}

}
